<?php

namespace TOKEN;

class Token {
	private $token;
	private $expirein;
	private $appid;
	private $appsecret;
	public function __construct($appid, $appsecret){
		$this->appid=$appid;
		$this->appsecret=$appsecret;
	}

	public function getToken(){
		$response=file_get_contents("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=".$this->appid."&secret=".$this->appsecret);
		var_dump($response);
	}
}
